{{ define "_default/_markup/td-render-heading.html" }}
<h{{.Level}}
{{- range $key, $value := .Attributes -}}
  {{printf " %s=%q" $key (string $value) | safeHTMLAttr -}}
{{- end -}}
>
{{- .Text | safeHTML -}}
<a class="td-heading-self-link" href="#{{.Anchor | safeURL}}" aria-label="Heading self-link"></a>
</h{{.Level}}>
{{ end }}

{{ template "_default/_markup/td-render-heading.html" . }}
